package com.neuedu.object;

public  abstract class Computer {
    private String hight;
   private String width;
    private String color;
    
    public Computer() {
    	System.out.println("无参构造器");
    }
    public Computer(String higth,String width,String color) {
    	//this：就是本类的对象，能够调用本类中成员变量和方法
    	this.hight=higth;
    	this.width=width;
    	this.color=color;
    	System.out.println("有参数的实现");
    }
    
    @Override
    public String toString() {

    	return this.getColor();
    }
    
    public void setHight(String higth) {
    	this.hight=higth;
    }
    public String getHight() {
    	return this.hight;
    }
	public String getWidth() {
		return width;
	}
	public void setWidth(String width) {
		this.width = width;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
    //重载：和 形参列表   有关  （类型，个数，顺序）
	    //和  返回值 无关
	protected  abstract void input(String hight);
	
	public void input(String hight,String width) {
		this.hight=hight;
		this.width=width;
	}
}
